package main.Q1001_1100;

import java.util.Arrays;

public class Q1051_1060 {
    public static void main(String[] args) {
        System.out.println("Question1051：高度检查器");
        System.out.println("Question1052：");
        System.out.println("Question1053：");
        System.out.println("Question1054：");
        System.out.println("Question1055：");
        System.out.println("Question1056：");
        System.out.println("Question1057：");
        System.out.println("Question1058：");
        System.out.println("Question1059：");
        System.out.println("Question1060：");
    }
}
class Question1051{
    public int heightChecker(int[] heights) {
        int[] sortArr = Arrays.copyOf(heights, heights.length);
        Arrays.sort(sortArr);
        int count=0;
        for (int i=0;i<heights.length;i++) {
            if (heights[i]!=sortArr[i]) count++;
        }
        return count;
    }
}